package com.dongwu.common.dto;

public class Result {

	private String status;
	
	private String message;
	
	private Object data;

	
	
	public Result() {

	}

	public Result(String status, String message) {
		this.status = status;
		this.message = message;
	}

	public Result(String status, String message, Object data) {
		this.status = status;
		this.message = message;
		this.data = data;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
	
	public static Result successResult() {
		Result result = new Result("0", "操作成功");
		return result;
	}
	
	
	public static Result successResult(Object data) {
		Result result = new Result("0", "操作成功", data);
		return result;
	}
	
	public static Result errorResult(String errorMessage) {
		Result result = new Result("-1", errorMessage);
		return result;
	}
	
	public static Result denyResult() {
		return errorResult("没有权限");
	}
	
}
